import request from '@/utils/request'

// 查询工序列表
export function listProce(query) {
  return request({
    url: '/mes/proce/list',
    method: 'get',
    params: query
  })
}

// 查询工序详细
export function getProce(id) {
  return request({
    url: '/mes/proce/' + id,
    method: 'get'
  })
}

// 新增工序
export function addProce(data) {
  return request({
    url: '/mes/proce',
    method: 'post',
    data: data
  })
}

// 修改工序
export function updateProce(data) {
  return request({
    url: '/mes/proce',
    method: 'put',
    data: data
  })
}

// 删除工序
export function delProce(id) {
  return request({
    url: '/mes/proce/' + id,
    method: 'delete'
  })
}
//根据工序id、工艺编码查询工序设备
export function getDevicesByProceIdAndTecCode(params){
  return request({
    url: '/mes/proinfo/getDevicesByProceIdAndTecCode',
    method: 'get',
    params:params
  })
}

export function getMtrByProceId(params){
  return request({
    url: '/mes/proinfo/getMtrByProceId',
    method: 'get',
    params:params
  })
}


